package org.xiaov.execption;

import org.xiaov.http.HttpCode;

import java.io.Serializable;

/**
 * @description: 权限异常
 * @author: xiaovcloud
 * @date: 2021/2/1 20:28
 */
public class XiaovAuthException extends XiaovUtilsException implements Serializable {

    private Integer code;

    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private XiaovAuthException() {
    }

    public XiaovAuthException(String message) {
        this.code = HttpCode.HTTP_FORBIDDEN.getValue();
        this.message = message;
    }

    public XiaovAuthException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    public XiaovAuthException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

}
